<!--省客户列表-->
<template>
  <div class="ne-advanced-conditions">
    <el-dialog
        :title="title"
        v-if="advancedVisible"
        :visible.sync="advancedVisible"
        width="50%"
    >
      <el-form :inline="false" :model="Form" :rules="rules" ref="Form" class="" label-width="1.2rem" style="margin-top: .2rem;">
        <el-form-item label="多条件查询：" prop="Nums">
          <el-input type="textarea" v-model="Form.Nums"></el-input>
        </el-form-item>
        <div class="exp">注：每一行代表一个设备号（EXCEL中的一列数据，可直接拷贝到此处作为查询条件）（最多輸入条件为200条）</div>
        <div class="text-center">
          <el-button @click="clearFun">清除</el-button>
          <el-button type="primary" @click="transFun">确认</el-button>
        </div>
      </el-form>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "PopAdvancedConditions",
  data(){
    return{
      rules: {
        Nums: [
          { required: true, message: '请输入需要查询得条件', trigger: 'blur' },
          { required: true, message: '请输入需要查询得条件', trigger: 'change' }
        ]
      },
      advancedVisible: false,
      Form:{
        Nums:''
      }
    }
  },
  props:{
    gadkey:{
      type:String
    },
    title:{
      type: String
    }
  },
  mounted() {
  },
  created() {
  },
  components:{
  },
  computed:{
  },
  methods:{
    clearFun(){
      this.Form.Nums = '';
    },
    transFun(){
      this.$refs['Form'].validate((valid) => {
        if (valid) {
          let value = '';
          value = this.Form.Nums.replace(/[\n\r]/g,',');
          this.$emit('gvalue',{value:value,key:this.gadkey});
          this.Form.Nums = '';
          this.advancedVisible = false;
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    }
  },
}
</script>

<style lang="scss" scoped>
::v-deep .el-textarea__inner{
  height: 3rem;
}
.exp{
  padding-left: .3rem;
  margin-bottom: .2rem;
  font-size: .12rem;
  color: red;
}
.ne-procumtomer{
  .ne-info-btns{
    ::v-deep .el-button{
      padding: 0;
    }
  }
  .ne-team-pop{
    width: 4rem;
  }
  ::v-deep .vxe-table--render-default .vxe-body--column:not(.col--ellipsis),::v-deep .vxe-table--render-default .vxe-footer--column:not(.col--ellipsis) {
    cursor: pointer;
  }
}
</style>

